<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.servlets.security.UpdateQbdz"%>
<%@page import="com.blockchain.front.service.security.entity.QbdzEntity"%>
<%@page import="com.blockchain.front.servlets.security.UpdateBank"%>
<%@page import="com.blockchain.front.service.security.entity.BankCard"%>
<%@page import="com.blockchain.front.service.security.entity.BankEntity"%>
<%@page import="com.blockchain.front.service.security.SecurityManage"%>
<%@page import="com.blockchain.common.enums.JymmType"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<html>
<head>
<%
String str = languageDefine.getValue(request, "walletAddressManagement_walletAddressManagement");
String _TITLE_ = str + "- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="QBDZGL"; 
PC_TITLE_NAME="QBDZGL";
SecurityManage manage = serviceSession.getService(SecurityManage.class);
QbdzEntity[] qbdzs=manage.getXlbxx();
int bid=IntegerParser.parse(request.getParameter("bid"));
QbdzEntity[] lists=manage.qbdzList(bid);
%>
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
<div class="autobox">
 <div class="now">
<a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_home")%></a>&gt; <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.security.index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_safeCenter")%></a> &gt; <%=languageDefine.getValue(request, "walletAddressManagement_walletAddressManagement")%>
 </div>
 <div class="assets_center clear po_re zin70">
  <%@include file="/WEB-INF/include/aqzx/left.jsp"%>
 <div class="assets_content w900 right bg_w">
            <div class="safe_center clear" style="padding-left: 0px;">
                <h1 style="margin-top: 0px; margin-bottom: 15px; line-height: 15px;"><%=languageDefine.getValue(request, "walletAddressManagement_walletAddressManagement")%></h1>
            </div>
            <div class="cnyin_record" style="width: 918px;">
                <div class="f_body">
                    <div class="f_body_main">
                        <div class="f_tab_body">
                            <div>
                                <table class="f_table" id="investLog_content">
                                    <thead>
                                    <tr>
                                        <th style="width: 160px;">
                                            <img id="tp" src="<%if(!StringHelper.isEmpty(manage.getTb(bid))){%><%=fileStore.getURL(manage.getTb(bid))%><%}%>" alt="" style="margin-bottom: -5px; width: 22px;"/>
                                            <select name="bid" id="qianbao_type">
                                                <%if(qbdzs!=null){for(QbdzEntity q:qbdzs){ if("cny".equalsIgnoreCase(q.ywjc)) continue; %>
                                                <option value="<%=q.id%>" <%if(q.id==bid){%> selected="selected"<%}%>><%StringHelper.filterHTML(out,backgroundDataFlag==1?q.zwm:backgroundDataFlag==2?q.ywjc:q.zwm_f);%> (<%StringHelper.filterHTML(out,q.ywjc);%> )</option>
                                                <%}}%>
                                            </select>
                                        </th>
                                        <th><%=languageDefine.getValue(request, "walletAddressManagement_walletTag")%></th>
                                        <th><%=languageDefine.getValue(request, "walletAddressManagement_walletAddress")%></th>
                                        <th><%=languageDefine.getValue(request, "walletAddressManagement_addTime")%></th>
                                        <th><%=languageDefine.getValue(request, "walletAddressManagement_operating")%></th>
                                    </tr>
                                    </thead>
                                    <%if(lists!=null){for(QbdzEntity qb:lists){%>
                                    <tbody>
                                      <tr>
                                          <td><%StringHelper.filterHTML(out,backgroundDataFlag==1?qb.zwm:backgroundDataFlag==2?qb.ywjc:qb.zwm_f);%> (<%StringHelper.filterHTML(out,qb.ywjc);%> )</td>
                                          <td><%StringHelper.filterHTML(out,qb.bq);%></td>
                                          <td><%StringHelper.filterHTML(out,qb.dz);%></td>
                                          <td><%=TimestampParser.format(qb.sj)%></td>
                                          <td><a href="<%=controller.getURI(request, UpdateQbdz.class)%>?id=<%=qb.id%>"><%=languageDefine.getValue(request, "walletAddressManagement_delete")%></a></td>
                                      </tr>
                                      </tbody>
                                    <%}}%>
                                </table>
                                <div class="pages">
                                    <a href="javascript:void(0)" onclick="showA()"><%=languageDefine.getValue(request, "walletAddressManagement_addOneAddress")%></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
 </div>
</div>
 <form id="form-pw" class="pw" action="<%=controller.getURI(request, Qbbz.class)%>" method="post" onsubmit="return onSubmit()" >
 <input type="hidden" name="bid" id="bid" >
<div class="okcoinPop" id="withdrawCnyAddress" style="display: none;">
    <div class="dialog_content" id="dialog_content_CnyAddress"
         style="margin-left: -200px; margin-top: 200px; left: 50%; top: 21px;">
        <div class="dialog_title" id="dialog_title_CnyAddress">
            <span id="CnyAddressTitle"><%=languageDefine.getValue(request, "walletAddressManagement_addOneWalletAddress")%></span>
            <a href="javascript:closeAddress();" class="dialog_closed" title='<%=languageDefine.getValue(request, "walletAddressManagement_close")%>'></a>
        </div>
        <div class="dialog_body center">
            <div style="line-height: 35px; text-align: left; padding-left: 50px;">
                <ul class="PopLayer">
                    <li>
                        <span class="c2" ><%=languageDefine.getValue(request, "walletAddressManagement_currencyName")%>:</span>
                       	 <span id="lotteryAmountSpan1"><%=languageDefine.getValue(request, "walletAddressManagement_btc")%></span> 
                    </li>
                    <li>
                        <span class="c2" id="lotteryAmountSpan2"><%=languageDefine.getValue(request, "walletAddressManagement_walletTag")%>:</span>
                        <input name="bq" id="qianbao_name" type="text" class="cztxinput"
                               style="width: 200px; padding: 2px; padding-bottom: 5px;">
                    </li>
                    <li>
                        <span class="c2" id="lotteryAmountSpan3"><%=languageDefine.getValue(request, "walletAddressManagement_walletAddress")%>:</span>
                        <input name="qbdz" id="qianbao_addr" type="text" class="cztxinput"
                               style="width: 200px; padding: 2px; padding-bottom: 5px;">
                    </li>
                    <li>
                        <span class="c2" id="lotteryAmountSpan4"><%=languageDefine.getValue(request, "walletAddressManagement_tradePassword")%>:</span>
                        <input name="jymm" id="qianbao_paypassword" type="password" class="cztxinput"
                               style="width: 100px; padding: 2px; padding-bottom: 5px;">
                    </li>
                    <li>
                        <input type="submit" value='<%=languageDefine.getValue(request, "walletAddressManagement_addNow")%>'  class="btn" id="btn">
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div id="dialogBoxShadow" style="position: absolute; top: 0px; left: 0px; z-index: 100; background-color: rgb(0, 0, 0); opacity: 0.4; width: 100%; background-position: initial initial; background-repeat: initial initial; display: none;"></div>
</form>
<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/js/cityselect.js"></script>
<script>
$("#qianbao_type").change(function () {
    var bid = $("#qianbao_type option:selected").val();
    window.location = '<%=controller.getViewURI(request,Qbbz.class)%>?bid='+bid; 
});


var coin = "btc";
function closeAddress() {
    $("#withdrawCnyAddress").hide();
    $("#dialogBoxShadow").hide();
}
function showA() {
    $("#withdrawCnyAddress").show();
    $('#dialogBoxShadow').height($(document).height());
    $("#dialogBoxShadow").show();
   	$("#lotteryAmountSpan1").html($('#qianbao_type option:selected').text());
   	$("#bid").val($('#qianbao_type option:selected').val());
}

 function onSubmit(){
	 var name = $('#qianbao_name').val();
     var addr = $('#qianbao_addr').val();
     var paypassword = $('#qianbao_paypassword').val();
     if (name == "" || name == null) {
         layer.tips('<%=languageDefine.getValue(request, "js_enterWalletId")%>', '#qianbao_name', {tips: 3});
         return false;
     }
     if (addr == "" || addr == null) {
         layer.tips('<%=languageDefine.getValue(request, "js_enterWalletAddress")%>', '#qianbao_addr', {tips: 3});
         return false;
     }
     if (paypassword == "" || paypassword == null) {
         layer.tips('<%=languageDefine.getValue(request, "js_enterTradePassword")%>', '#qianbao_paypassword', {tips: 3});
         return false;
     }
  return true;
 }

<%String error = controller.getPrompt(request,response,PromptLevel.ERROR);if(!StringHelper.isEmpty(error)){%>
	layer.open({
	title: '<%=languageDefine.getValue(request, "js_tip")%>',
	content: '<%=languageDefine.getValue(request,error)%>'
});
	 showA(); 
<%}%>
</script>
